wayland: Map windows with tooltip hint as subsurfaces
authorJonas Ådahl <jadahl@gmail.com>
Tue, 13 Oct 2015 12:48:51 +0000 (20:48 +0800)
committerJonas Ådahl <jadahl@gmail.com>
Sun, 18 Oct 2015 13:32:22 +0000 (21:32 +0800)
Tooltips tend to be placed on top of a parent surface with a given
relative coordinate, and without any input focus. So lets map them as
subsurfaces.

https://bugzilla.gnome.org/show_bug.cgi?id=756496

gdk/wayland/gdkwindow-wayland.c

index 2447c5d4b4843bd5f3b95d25401d844d3ad50b72..8d311371f15af382c1b3c6a42331201e25de3f53 100644 (file)
@@ -1221,9 +1221,14 @@ should_be_mapped (GdkWindow *window)
 static gboolean
 should_map_as_subsurface (GdkWindow *window)
 {
+  GdkWindowImplWayland *impl = GDK_WINDOW_IMPL_WAYLAND (window->impl);
+
   if (GDK_WINDOW_TYPE (window) == GDK_WINDOW_SUBSURFACE)
     return TRUE;
 
+  if (impl->hint == GDK_WINDOW_TYPE_HINT_TOOLTIP)
+    return TRUE;
+
   return FALSE;
 }